// Order types and interfaces
export interface OrderItem {
  id: string;
  productType: string;
  productName: string;
  quantity: number;
  price: number;
  period?: string;
  traffic?: number;
  ips?: number;
}

export interface Order {
  id: string;
  orderNumber: string;
  date: string;
  total: number;
  status: 'pending' | 'completed' | 'failed' | 'refunded';
  items: OrderItem[];
  paymentMethod?: string;
  paymentStatus: 'unpaid' | 'paid' | 'refunded';
  shippingAddress?: {
    name: string;
    email: string;
    address: string;
    city: string;
    state: string;
    zipCode: string;
    country: string;
  };
}

export interface CreateOrderRequest {
  items: OrderItem[];
  total: number;
  couponCode?: string;
  discount?: number;
  billingDetails?: {
    fullName: string;
    email: string;
    address: string;
    postalCode: string;
    country: string;
  };
}

export interface CreateOrderResponse {
  success: boolean;
  order?: Order;
  error?: string;
}
